<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption">
			<i class="fa fa-cog"></i>
			订单管理 > 服务管理 > 维修服务列表
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
		</div>
	</div>
	<div style="background-color: rgb(249, 247, 161);">
		<label>
			
		</label>
	</div>
	<div class="portlet-body">
		<div class="tabbable-line ">
			<ul class="nav nav-tabs ">
				<li #if(!$!searchModel.orderState) class="active" #end>
					<a href="/orderRepaire/list" class="ajaxify">全部 </a>
				</li>
				<li #if($!searchModel.orderState== 'WAIT_DELIVERY') class="active" #end>
					<a href="/orderRepaire/list?orderState=WAIT_DELIVERY" class="ajaxify">待发货</a>
				</li>
				<li #if($!searchModel.orderState== 'WAIT_REVICE') class="active" #end>
					<a href="/orderRepaire/list?orderState=WAIT_REVICE" class="ajaxify">待收货</a>
				</li>
				<li #if($!searchModel.orderState== 'TRADE_FINISHED') class="active" #end>
					<a href="/orderRepaire/list?orderState=TRADE_FINISHED" class="ajaxify">已完成</a>
				</li>
			</ul>
			<div class="tab-content">
				<div class="tab-pane active form"></div>
			</div>
		</div>

		<div class="portlet-body form">
			<form action="/orderRepaire/list" class="form-horizontal" method="get" id="searchForm" onsubmit="return false">
				<div class="form-body">
					<div class="row">
						<div class="col-md-3">
							<label class="col-md-4 control-label">订单号：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="id" value="$!searchModel.id">
						    	<input type="hidden" name="orderState" value="$!searchModel.orderState" />
							</div>
						</div>
						<div class="col-md-3">
							<label class="col-md-4 control-label">会员：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="username" value="$!searchModel.username">
							</div>
						</div>
						<div class="col-md-3">
							<label class="col-md-4 control-label">收货人：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="receiver" value="$!searchModel.receiver">
							</div>
						</div>
		    		</div>
		    		<div class="row">
		    		&nbsp;<br/>
		    		</div>
		    		<div class="row">
						<div class="col-md-5">
							<label class="col-md-3 control-label">生成时间：</label>
							<div class="col-md-4">
						    	<input type="text" class="form-control" readOnly id="startTime" name="startTime" value="$!startTime">
						    	<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</div>
							<div class="col-md-1">~</div>
							<div class="col-md-4">
						    	<input type="text" class="form-control"readOnly id="endTime" name="endTime" value="$!endTime">
						    	<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</div>
						</div>
						<div class="col-md-7">
							<div class="actions col-md-12">
								<a href="javascript:;" class="btn green btn-sm ajax-search"><i class="fa fa-search"></i> 查询 </a>
								<a href="javascript:;" class="btn green btn-sm search-reset"><i class="fa fa-eraser"></i> 清除 </a>
							</div>
						</div>
		    		</div>
				</div>
			</form>
		</div>
		
		<div class="dataTables_wrapper no-footer">
			<div class="table-scrollable">
			    <table class="table table-striped table-bordered table-hover">
				  	<thead>
						<tr>
		   		 			<th>维修单号</th>
		   		 			<th>订单状态</th>
		   		 			<th>配送方式</th>
		   		 			<th>换货会员</th>
		   		 			<th>收货人</th>
		   		 			<th>收货人电话</th>
		   		 			<th>生成时间</th>
		   		 			<th>企业名称</th>
							<th class="col-md-2">操作</th>
						</tr>
					</thead>
					<tbody>
					#foreach($item in $pageOrderRepaire.result)
		  				<tr>
						    <td>
							    <a class="btn btn-outline btn-sm ajaxify" href="/orderRepaire/edit?id=$!item.id"> 
							    	$!item.id
							    </a>
						    </td>
						    <td>$!item.orderState.name</td>
						    <td>$!item.tranType.name</td>
						    <td>$!item.username</td>
						    <td>$!item.receiver</td>
						    <td>$!item.shippingInfoModel.phone</td>
						    <td>$!item.createDate</td>
						    <td>$!item.company</td>
			    			<td>
						    	<a class="btn green btn-outline btn-sm ajaxify" href="/orderRepaire/edit?id=$!item.id"> 
									<i class="fa fa-edit"></i>编辑
								</a>
								#if($!item.orderState == 'WAIT_REAPIRING')
									<a class="btn green btn-outline btn-sm ajax-operation" thref="/orderRepaire/finishRepair?id=$!item.id" tohref="/orderRepaire/list"> 
										<i class="fa fa-check"></i>维修完成
									</a>
								#end
						    </td>		  			
		  				</tr>
					#end
					</tbody>
				</table>
			</div>
			#set($page=$pageOrderRepaire)
			#set($pageUrl="/orderRepaire/list?orderState=$!searchModel.orderState&pageNo=")
			#parse("_page.htm")
		</div>
	</div>
</div>
<script type="text/javascript">
     $("input[name=id]").focus();
</script>
<script src="/assets/scripts/views-date.js" type="text/javascript"></script>